package net.huashitong.ssydt.provider.money.mapper;

import net.huashitong.ssydt.money.entity.SsMoneyOrderDetail;
import net.huashitong.ssydt.provider.money.dto.DetailJoinOrderDTO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SsMoneyOrderDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SsMoneyOrderDetail record);

    int insertSelective(SsMoneyOrderDetail record);

    SsMoneyOrderDetail selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SsMoneyOrderDetail record);

    int updateByPrimaryKey(SsMoneyOrderDetail record);

    void save(SsMoneyOrderDetail ssMoneyOrderDetail);

    void batchSave(List<SsMoneyOrderDetail> ssMoneyOrderDetails);

    /**
     * 根据订单编号获取列表
     *
     * @param orderId
     * @return
     */
    List<SsMoneyOrderDetail> queryByOrderId(String orderId);

    /**
     * 查询用户对某件商品的购买数量
     *
     * @param dto
     * @return
     */
    List<SsMoneyOrderDetail> queryJoinOrderByUserIdWithGoodsIdWithGoodsType(DetailJoinOrderDTO dto);
}